//
//  GridConcurrencyDemoVC.swift
//  grid-ios-app
//
//  Created by wondertek on 2024/4/19.
//

import UIKit

class GridConcurrencyDemoVC: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        view.backgroundColor = .white
        Task {
           
            do {
                let result = await NetWorkRequest(API.easyRequset, modelType: [ZhihuItemModel].self)
                if let models = result.model {
                    print("异步请求获取到的模型标题__\(models.map({$0.title ?? ""}))")
                } else {
                    print("异步请求获取失败__\(result.response)")
                }
            }
        }
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
